/*    */ package tools;
/*    */ 
/*    */ import java.security.Key;
/*    */ import javax.crypto.Cipher;
/*    */ import javax.crypto.spec.SecretKeySpec;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class TripleDESCipher
/*    */ {
/* 12 */   public byte[] aKey = new byte[24];
/*    */   
/*    */   public Key pKey;
/*    */   
/*    */   public TripleDESCipher(byte[] aKey) {
/* 17 */     System.arraycopy(aKey, 0, this.aKey, 0, aKey.length);
/* 18 */     this.pKey = new SecretKeySpec(aKey, "DESede");
/*    */   }
/*    */   
/*    */   public byte[] Encrypt(byte[] aData) throws Exception {
/* 22 */     Cipher pCipher = Cipher.getInstance("DESede");
/* 23 */     pCipher.init(1, this.pKey);
/* 24 */     return pCipher.doFinal(aData);
/*    */   }
/*    */   
/*    */   public byte[] Decrypt(byte[] aData) throws Exception {
/* 28 */     Cipher pCipher = Cipher.getInstance("DESede");
/* 29 */     pCipher.init(2, this.pKey);
/* 30 */     return pCipher.doFinal(aData);
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\tools\TripleDESCipher.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */